<?php
// +----------------------------------------------------------------------
// | ProjectName : domall
// +----------------------------------------------------------------------
// | Description :  首页
// +----------------------------------------------------------------------
// | Copyright (c) 2015-2016 http://www.idowe.com All rights reserved.
// +----------------------------------------------------------------------
// | Authors : Johhny <chenjf@idowe.com>  Date : 2016-02-05
// +----------------------------------------------------------------------
namespace app\index\controller;

use think\Controller;

class Base extends Controller{

    /**
     * 构造函数
     * Base constructor.
     */
    public function __construct() {
        parent::__construct();
        $this->assign('11',11);
    }

    /**
     * 重写fetch 方便管理视图 主题风格
     * @author Johhny <chenjf@idowe.com>
     * @param string $template
     * @param array $vars
     * @param array $cache
     * @param bool $renderContent
     * @return string
     * @throws \think\Exception
     */
    public function fetch($template = '', $vars = [], $cache = [], $renderContent = false){
//        $view = new View();
//        $view->assign($this->view);
        $this->view->theme(C('index_theme'));
        $this->view->config('view_suffix',C('index_view_suffix'));
        $this->view->config('view_depr',C('index_view_depr'));
        return $this->view->fetch($template, $vars, $cache, $renderContent);
    }
}